-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factory sort tactic #252
Factory sort tactic #252
Conversation
bd2a342
to
eef2a1e
Compare
40e1fdb
to
be2e9a8
Compare
45f33f8
to
171dd27
Compare
@gares shall we merge? |
We have to decide what to do with the code of eta and factory.sort, which is half commented |
I would wait to talk about it live, maybe on Tuesday? |
users can make it fatal by -w +NFI
ebf5846
to
7b659c6
Compare
This reverts commit d8740d4.
@CohenCyril this is green again. I could measure precisely the performances and:
This Pr math-comp/math-comp#770 contains a cleanup commit and another one where I use HB.pack behind the scenes. To me, it looks like an improvement, especially since one does not need to retrofit some inheritance by sneaking a structure projection somewhere. After the last commit you can write HB.pack Key Tsomething Factory, which is quite natural, eg So to me it seems the factory sort via CS is superseded, since there is no performance loss. The only mixed feeling left is that Once we merge this PR I can start playing with strategy again. Do you agree with the plan above (use HB.pack directly). |
Yes, I agree. |
HB.pack is an exported tactic. Elpi Export tac is the same thing of tac-in-terms, it adds a grammar rule. But this time the grammar rule is just one and mentions HB, so it is more legit that it is global (it is governed by Import structures, not by Import GRing.Foo). Being a grammar rule it receives the right loc, so in planB you get it replaced by |
OK, so this means planB stops usercode from packing inside code... While before they "just" could not add a new structure... |
Can you exaplian better? I don't follow. |
Yes sorry. As I understand it the purpose of HB plan B is to reassure HB users developing a library such as mathcomp, that they do not have to depend on elpi, they can translate everything and ship the code without elpi. The cost is the unability to add new structures, but the rest is supposed to work just fine. Now, if building an instance in the middle of the proof requires HB, then it impacts users as well... One could argue that without |
This should make Factory.sort unnecessary and speed up compilation.
We use xpack to avoid conflicts.
This now requires LPCIC/coq-elpi#257
The status is the following:
HB.pack
tactic which can be used for any structure (but no planB), works aspose X : S.type := HB.pack T F
Structure.xpack
generated for any structure. Note that it's not a real qualification, it's a global notation; works aspose X := S.xpack T F
short(pack = "name")
coq.hb
since the loc are right, but the patch is not line based, but rather char based)Fix #253